/*
  {
    "bannerList": [
      {
        "id": "1194556896025845762",
        "gmtCreate": "2019-11-13 18:05:32",
        "gmtModified": "2021-08-09 21:28:41",
        "deleted": false,
        "title": "大数据Scala入门到精通（新版）",
        "imageUrl": "https://online-teach-file.oss-cn-beijing.aliyuncs.com/cover/2021/08/10/f2cd321f-6378-4e92-8515-0b8f42f2770b.jpg",
        "linkUrl": "/course/1424997480087281666",
        "sort": 1
      },
    ]
  }
*/
export interface IBannerItem {
  id: string;
  // gmtCreate: "2019-11-13 18:05:32";
  // gmtModified: "2021-08-09 21:28:41";
  // deleted: false;
  title: string;
  imageUrl: string;
  linkUrl: string;
  // sort: 1;
}

export type IBannerList = IBannerItem[];

export interface IGetBannerListApiResponse {
  bannerList: IBannerList;
}

/*
  {
    "teacherList": [
      {
        "id": "1196725201876611073",
        "gmtCreate": "2019-11-19 17:41:37",
        "gmtModified": "2022-05-09 20:04:27",
        "deleted": false,
        "name": "孟老师",
        "intro": "具有多年项目开发和教育培训经验，曾在日本野村证券主持开发金融证券项目，对金融数据处理具有丰富的经验。曾为北京积水潭医院主持开发过网络预约，挂号，分诊系统等。对主流框架Spring、Struts2、Hibernate、MyBatis、SpringMVC、SpringBoot、SpringCloud有深入的研究。",
        "career": "具有多年项目开发和教育培训经验，曾在日本野村证券主持开发金融证券项目，对金融数据处理具有丰富的经验。曾为北京积水潭医院主持开发过网络预约，挂号，分诊系统等。对主流框架Spring、Struts2、Hibernate、MyBatis、SpringMVC、SpringBoot、SpringCloud有深入的研究。",
        "level": 1,
        "avatar": "http://47.93.148.192:8080/group1/M00/01/72/rBHu8mEQy3aAV4w5AAAy8BAv7sQ653.jpg",
        "sort": 1
      },
    ],
    "courseList": [
      {
        "id": "18",
        "teacherId": "1189389726308478977",
        "subjectId": "1178214681139539969",
        "subjectParentId": "1178214681118568449",
        "title": "Java精品课程",
        "price": 22800.00,
        "lessonNum": 20,
        "cover": "https://online-teach-file.oss-cn-beijing.aliyuncs.com/cover/2021/08/09/e4ee03d7-52bd-41ca-99f9-04dc23250a71.jpg",
        "buyCount": 6786,
        "viewCount": 68485,
        "version": 6,
        "status": "Normal",
        "gmtCreate": "2018-04-02 21:28:46",
        "gmtModified": "2022-09-20 09:19:40"
      },
    ]
  }
*/

export interface ITeacherItem {
  id: string;
  name: string;
  intro: string;
  // career: "";
  avatar: string;
}

export type ITeacherList = ITeacherItem[];

export interface ICourseItem {
  id: string;
  title: string;
  price: number;
  cover: string;
  buyCount: number;
  viewCount: number;
  subjectLevelOne: string;
  subjectLevelTwo: string;
  avatar: string;
  description: string;
  intro: string;
  lessonNum: number;
  teacherName: string;
}

export type ICourseList = ICourseItem[];

export interface IGetCourseAndTeacherListApiResponse {
  teacherList: ITeacherList;
  courseList: ICourseList;
}

export interface IGetCourseListApiResponse {
  pages: number;
  items: ICourseList;
}

export interface ILoginApiResponse {
  token: string;
}

/*
  {
    "isBuy": true,
    "chapterList": [
      {
        "id": "15",
        "title": "第一章：Java入门",
        "children": [
          {
            "id": "17",
            "title": "第一节：Java简介",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          },
          {
            "id": "18",
            "title": "第二节：表达式和赋值语句",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          },
          {
            "id": "19",
            "title": "第三节：String类",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          },
          {
            "id": "20",
            "title": "第四节：程序风格",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          }
        ]
      },
      {
        "id": "32",
        "title": "第二章：控制台输入和输出",
        "children": [
          {
            "id": "1182499307429339137",
            "title": "第一节",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          }
        ]
      },
    ],
    "isCollect": true,
    "course": {
      "id": "18",
      "title": "Java精品课程",
      "price": 22800.00,
      "lessonNum": 20,
      "cover": "https://online-teach-file.oss-cn-beijing.aliyuncs.com/cover/2021/08/09/e4ee03d7-52bd-41ca-99f9-04dc23250a71.jpg",
      "buyCount": 6786,
      "viewCount": 68489,
      "description": "<p>本套Java视频完全针对零基础学员，课堂实录，自发布以来，好评如潮！Java视频中注重与学生互动，讲授幽默诙谐、细致入微，覆盖Java基础所有核心知识点，同类Java视频中也是代码量大、案例多、实战性强的。同时，本Java视频教程注重技术原理剖析，深入JDK源码，辅以代码实战贯穿始终，用实践驱动理论，并辅以必要的代码练习。</p>\n<p>------------------------------------</p>\n<p>视频特点：</p>\n<p>通过学习本Java视频教程，大家能够真正将Java基础知识学以致用、活学活用，构架Java编程思想，牢牢掌握\"源码级\"的Javase核心技术，并为后续JavaWeb等技术的学习奠定扎实基础。<br /><br />1.通俗易懂，细致入微：每个知识点高屋建瓴，深入浅出，简洁明了的说明问题<br />2.具实战性：全程真正代码实战，涵盖上百个企业应用案例及练习<br />3.深入：源码分析，更有 Java 反射、动态代理的实际应用等<br />4.登录尚硅谷官网，技术讲师免费在线答疑</p>",
      "teacherId": "1189389726308478977",
      "teacherName": "封老师",
      "intro": "中国人民大学软件工程硕士。精通java核心框架、大数据Hadoop、Spark技术，曾先后就职于南天软件、用友金融、中植集团、百合贷，任技术经理、项目经理、技术部负责人。主持开发了中信银行、国家电网、中植集团、东方资产等大型企业的金融类系统，也对时下流行的互联网金融有深入的研究。 十余年的项目经历，练就了纯厚的技术底蕴和丰富的职场经验。",
      "avatar": "http://47.93.148.192:8080/group1/M00/01/72/rBHu8mEQyliAYtsQAAA0GUaiJrk198.jpg",
      "subjectLevelOneId": "1178214681118568449",
      "subjectLevelOne": "后端开发",
      "subjectLevelTwoId": "1178214681139539969",
      "subjectLevelTwo": "Java"
    }
  }
*/

export interface IChapterChildrenItem {
  id: string;
  title: string;
  free: boolean;
  videoSourceId: string;
}

export type IChapterChildren = IChapterChildrenItem[];

export interface IChapterItem {
  id: string;
  title: string;
  children: IChapterChildren;
}

export type IChapterList = IChapterItem[];

export interface IGetCourseDetailApiResponse {
  isBuy: boolean;
  chapterList: IChapterList;
  isCollect: boolean;
  course: ICourseItem;
}

/*
  {
    "pages": 4,
    "items": [
      {
        "id": "1571018101615665154",
        "gmtCreate": "2022-09-17 14:07:58",
        "gmtModified": "2022-09-17 14:07:58",
        "deleted": null,
        "courseId": "14",
        "teacherId": "1189426464967995393",
        "memberId": "1",
        "nickname": "张小",
        "avatar": "http://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoj0hHXhgJNOTSOFsS4uZs8x1ConecaVOB8eIl115xmJZcT4oCicvia7wMEufibKtTLqiaJeanU2Lpg3w/132",
        "content": "xuexue\n\n"
      }
    ]
  }
*/
export interface ICommentItem {
  id: string;
  courseId: string;
  teacherId: string;
  memberId: string;
  nickname: string;
  avatar: string;
  content: string;
  gmtModified: string;
}

export type ICommentList = ICommentItem[];
export interface IGetCommentListApiResponse {
  pages: number;
  items: ICommentList;
  total: number;
}
